<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
    <script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
    <script>



        function changetab(title){
            var url="";
            switch (title) {
                case 'userTable':
                    url="./user/table.html";
                    break;

                case 'Bar':
                    url="./echarts/Bar.html";
                    break;
                case 'doctorList':
                    url="./doctors/doctorList.html";
                    break;
                case 'studentList':
                    url="/studentList.html";
                    break;

                default:
                    break;
            }

            $("#main").attr("src",url);
        }

        function changetab1(title){
            var url="";
            switch (title) {
                case 'userTable':
                    url="./user/table.html";
                    break;

                case 'Bar':
                    url="./echarts/Bar.html";
                    break;
                case 'leaveRequest':
                    url="/frontSrc/static/personalcenter/leaveRequest.html";
                    break;
                case 'studentList':
                    url="/studentList.html";
                    break;

                default:
                    break;
            }

            $("#main").attr("src",url);
        }


        function changetab2(title){
            var url="";
            switch (title) {
                case 'performance':
                    url="/frontSrc/static/performance/performanceSelect.html";
                    break;
                default:
                    break;
            }

            $("#main").attr("src",url);
        }


    </script>
    <script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>


</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">layout demo</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <!-- 移动端显示 -->
            <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                <i class="layui-icon layui-icon-spread-left"></i>
            </li>

            <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">nav groups</a>
                <dl class="layui-nav-child">
                    <dd><a href="">menu 11</a></dd>
                    <dd><a href="">menu 22</a></dd>
                    <dd><a href="">menu 33</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img id="imageId" src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
                    <span id="currentUser"></span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="/frontSrc/static/user/infoUpdate.html">个人资料</a></dd>
                    <dd><a href="">修改密码</a></dd>
                    <dd><a href="">退出登录</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:;">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">模板</a>
                    <dl class="layui-nav-child">
                        <dd ><a href="javascript:;" onclick="changetab('userTable')">用户列表</a></dd>
                        <dd ><a href="javascript:;" onclick="changetab('Bar')">统计信息</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('doctorList')" >医生管理</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('studentList')" >学员管理</a></dd>
                        <dd><a href="">科室管理</a></dd>
                    </dl>
                </li>




                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">个人中心</a>
                    <dl class="layui-nav-child">
                        <dd ><a href="javascript:;" onclick="changetab1('userTable')">代办事项</a></dd>
                        <dd ><a href="javascript:;" onclick="changetab1('Bar')">我的申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('doctorList')" >已完成申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('leaveRequest')" >请假申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('studentList')" >补卡申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('studentList')" >加班申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('studentList')" >出差申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('studentList')" >报销申请</a></dd>
                        <dd><a href="javascript:;" onclick="changetab1('studentList')" >会议申请</a></dd>

                    </dl>
                </li>

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">模板</a>
                    <dl class="layui-nav-child">
                        <dd ><a href="javascript:;" onclick="changetab('userTable')">用户列表</a></dd>
                        <dd ><a href="javascript:;" onclick="changetab('Bar')">统计信息</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('doctorList')" >医生管理</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('studentList')" >学员管理</a></dd>
                        <dd><a href="">科室管理</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">模板</a>
                    <dl class="layui-nav-child">
                        <dd ><a href="javascript:;" onclick="changetab('userTable')">用户列表</a></dd>
                        <dd ><a href="javascript:;" onclick="changetab('Bar')">统计信息</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('doctorList')" >医生管理</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('studentList')" >学员管理</a></dd>
                        <dd><a href="">科室管理</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">绩效管理</a>
                    <dl class="layui-nav-child">
                        <dd ><a href="javascript:;" onclick="changetab2('performance')">绩效查询</a></dd>
                        <!-- <dd ><a href="javascript:;" onclick="changetab('Bar')">统计信息</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('doctorList')" >医生管理</a></dd>
                        <dd><a href="javascript:;" onclick="changetab('studentList')" >学员管理</a></dd>
                        <dd><a href="">科室管理</a></dd> -->
                    </dl>
                </li>





                <li class="layui-nav-item"><a href="javascript:;">click menu item</a></li>
                <li class="layui-nav-item"><a href="">the links</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <iframe id="main" src="welcome.html" frameborder="0" style="width: 100%; height: 600px;"></iframe>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        版权所有@java2301
    </div>
</div>

    <script src="../layui/layui.js" charset="utf-8"></script>

<script type="text/javascript">
    log = function() {


        var obj = JSON.parse(localStorage.getItem("token"))
        

        document.getElementById("currentUser").innerHTML = obj.username
        document.getElementById("imageId").src = obj.pic

    }
    log();
</script>


</body>
</html>